// main.cpp
// DLL entry point

#include "plugin.h"

#pragma comment (lib, "core.lib")
#pragma comment (lib, "geom.lib")
#pragma comment (lib, "gfx.lib")
#pragma comment (lib, "mesh.lib")
#pragma comment (lib, "maxutil.lib")
#pragma comment (lib, "maxscrpt.lib")
#pragma comment (lib, "paramblk2.lib")
#pragma comment (lib, "msxml2.lib")
#pragma comment (lib, "igame.lib")
#pragma comment (lib, "comctl32.lib")

// globals
HINSTANCE	hinstance;
bool init_controls = false;

// entry point for the dll
BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved)
{
	hinstance = hinstDLL;				// Hang on to this DLL's instance handle.

	if (!init_controls) {
		init_controls = true;
		InitCustomControls(hinstance);	// Initialize MAX's custom controls
		InitCommonControls();			// Initialize Win95 controls
	}
			
	return TRUE;
}

// functions required
const TCHAR* LibDescription()
{
	return "This library contains scene and animation export plugins.";
}

int LibNumberClasses()
{
	return 2;
}

ClassDesc* LibClassDesc(int i)
{
	switch(i)
	{
		case 0:
			return GetSceneyExportPluginDesc();
			break;
		case 1:
			return GetAnimeyExportPluginDesc();
			break;
	}

	return 0;
}

ULONG LibVersion()
{
	return VERSION_3DSMAX;
}

ULONG CanAutoDefer()
{
	return 0;
}
